import React, { Component } from 'react';

class App extends Component {
  render() {
    return (
      <div>
        <h1>App组件</h1>
        <h2>嘿嘿</h2>
        <h3>哈哈</h3>
      </div>
    );
  }
}
//简单高阶组件写法(有状态)
/* function HOC(WarpedComponent){
 return class Dome extends Component{
   render(){
     return <WarpedComponent></WarpedComponent>
   }
 }
} */
//无状态
function HOC(WarpedComponent){
  return function Dome(){
    return <WarpedComponent></WarpedComponent>
  }
}
export default HOC(App);
